<template>
  <ion-app>
    <ion-router-outlet/>
  </ion-app>
</template>

<script lang="ts">
import { IonApp, IonRouterOutlet,useBackButton, useIonRouter } from '@ionic/vue';
import { defineComponent,provide,ref } from 'vue';
import { App } from '@capacitor/app';

export default defineComponent({
  name: 'App',
  components: {
    IonApp,
    IonRouterOutlet
  },
  setup() {
    const ionRouter = useIonRouter();
    useBackButton(-1, () => {
      if (!ionRouter.canGoBack()) {
        App.exitApp();
      }
    });
    const refss=ref(true);
    const reload = () => {
      refss.value=false;
      setTimeout(()=>{
        refss.value=true;
      },1)
    }
    provide('reload', reload)
    provide('refss', refss)
    return {
      refss
    }
  }
});
</script>
